function reduce(arr, callback, initValue) {
    let result = initValue
    for (var i = 0; i < arr.length; i++) {
        result = result + arr[i]
    }
    return result
}